/* 
 * 所有尺寸使用 px 单位，将由 postcss-pxtorem 自动转换为 rem
 * vite.config.js 中设置 rootValue: 75，基于 750px 设计稿
 * 即：设计稿上 750px 宽度 = 10rem
 */

/* 主容器 */
.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f8f8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  }
  
  /* 导航栏样式 */
  .navBar {
    background: linear-gradient(90deg, #ff9000, #ff5000);
    color: white;
    padding: 10px 30px;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 80, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 88px;
  }
  
  /* 导航栏左侧部分 */
  .navLeft {
    display: flex;
    align-items: center;
  }
  
  /* 导航栏右侧部分 */
  .navRight {
    display: flex;
    align-items: center;
  }
  
  /* 返回按钮区域 */
  .backButton {
    display: flex;
    align-items: center;
    font-size: 32px;
    font-weight: 500;
  }
  
  /* 返回图标 */
  .backIcon {
    font-size: 40px;
    margin-right: 8px;
  }
  
  /* 分享图标 */
  .shareIcon {
    font-size: 40px;
  }
  
  .navBarTitle {
    font-size: 36px; /* 设计稿上约 36px */
    font-weight: bold;
    letter-spacing: 2px;
  }
  
  .navBarIcon {
    font-size: 40px; /* 设计稿上约 40px */
    color: white;
  }
  
  /* 聊天内容区域 */
  .chatContainer {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background-color: #f8f8f8;
    -webkit-overflow-scrolling: touch; /* 增强移动端滚动体验 */
  }
  
  /* 消息气泡通用样式 */
  .messageCell {
    margin: 24px 0;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    max-width: 85%;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  /* 机器人消息 */
  .botMessage {
    align-self: flex-start;
    margin-right: auto;
    background-color: white;
    border: 1px solid #eaeaea;
  }
  
  /* 用户消息 */
  .userMessage {
    align-self: flex-end;
    margin-left: auto;
    background-color: #ffecdc;
    border: 1px solid #ffddbd;
    color: #333;
  }
  
  /* 消息内容容器 */
  .messageContent {
    padding: 24px;
    line-height: 1.5;
  }
  
  /* 消息头部（头像和名称） */
  .messageHeader {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
  }
  
  .botHeader {
    flex-direction: row;
  }
  
  .userHeader {
    flex-direction: row-reverse;
  }
  
  /* 头像样式 */
  .avatar {
    width: 64px; /* 设计稿上约 64px */
    height: 64px; /* 设计稿上约 64px */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 16px;
    font-size: 32px;
  }
  
  .botAvatar {
    background-color: #ff5000;
    color: white;
  }
  
  .userAvatar {
    background-color: #1890ff;
    color: white;
  }
  
  /* 发送者名称 */
  .senderName {
    font-size: 28px; /* 设计稿上约 28px */
    font-weight: 500;
  }
  
  .botName {
    color: #ff5000;
  }
  
  .userName {
    color: #1890ff;
  }
  
  /* 消息文本 */
  .messageText {
    margin-top: 16px;
    font-size: 30px; /* 设计稿上约 30px */
    word-break: break-word;
  }
  
  .messageLine {
    margin: 12px 0;
  }
  
  /* 输入区域 */
  .inputArea {
    padding: 24px 30px;
    background-color: white;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
  }
  
  .inputField {
    flex: 1;
    height: 80px; /* 设计稿上约 80px */
    border: 2px solid #ddd;
    border-radius: 40px;
    padding: 0 30px;
    font-size: 30px; /* 设计稿上约 30px */
    background-color: #f5f5f5;
    transition: all 0.3s;
  }
  
  .inputField:focus {
    border-color: #ff5000;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(255, 80, 0, 0.1);
  }
  
  .sendButton {
    width: 140px; /* 设计稿上约 140px */
    height: 80px; /* 设计稿上约 80px */
    margin-left: 20px;
    border-radius: 40px;
    background: linear-gradient(90deg, #ff9000, #ff5000);
    color: white;
    font-size: 30px; /* 设计稿上约 30px */
    font-weight: 500;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(255, 80, 0, 0.2);
    transition: all 0.3s;
  }
  
  .sendButton:hover {
    opacity: 0.9;
    transform: translateY(-2px);
  }
  
  .sendButton:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
  }
  
  /* 快捷回复按钮区域 */
  .quickReplies {
    display: flex;
    flex-wrap: wrap;
    padding: 20px 30px;
    background-color: white;
    border-top: 1px solid #f0f0f0;
    gap: 20px;
  }
  
  .quickReplyButton {
    padding: 16px 30px;
    background-color: #fff5f0;
    border: 1px solid #ffddbd;
    border-radius: 32px;
    color: #ff5000;
    font-size: 28px; /* 设计稿上约 28px */
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
  }
  
  .quickReplyButton:hover {
    background-color: #ffecdc;
    transform: scale(1.05);
  }
  
  /* 转人工按钮 */
  .transferButton {
    margin-top: 40px;
    padding: 20px 0;
    width: 60%;
    text-align: center;
    background-color: #fff5f0;
    border: 1px dashed #ffddbd;
    border-radius: 40px;
    color: #ff5000;
    font-size: 28px; /* 设计稿上约 28px */
    cursor: pointer;
    margin-left: auto;
    margin-right: auto;
    display: block;
    transition: all 0.3s;
  }
  
  .transferButton:hover {
    background-color: #ffecdc;
    border-color: #ff9000;
  }
  
  /* 加载动画 */
  .typingIndicator {
    display: flex;
    padding: 20px;
    margin: 16px 0;
    width: fit-content;
  }
  
  .typingDot {
    width: 16px; /* 设计稿上约 16px */
    height: 16px; /* 设计稿上约 16px */
    margin: 0 4px;
    background-color: #ff9000;
    border-radius: 50%;
    animation: typingAnimation 1.4s infinite ease-in-out;
  }
  
  .typingDot:nth-child(1) {
    animation-delay: 0s;
  }
  
  .typingDot:nth-child(2) {
    animation-delay: 0.2s;
  }
  
  .typingDot:nth-child(3) {
    animation-delay: 0.4s;
  }
  
  @keyframes typingAnimation {
    0%, 60%, 100% {
      transform: translateY(0);
    }
    30% {
      transform: translateY(-10px);
    }
  }
  
  /* 时间标记 */
  .timestamp {
    text-align: center;
    font-size: 24px; /* 设计稿上约 24px */
    color: #999;
    margin: 30px 0;
  }
  
  .timestampText {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
  }
  /* 自定义对话框样式 */
.customDialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dialogOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.dialogContent {
  width: 80%;
  max-width: 560px;
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dialogHeader {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.dialogTitle {
  margin: 0;
  font-size: 32px;
  font-weight: normal;
}

.dialogBody {
  padding: 20px;
  font-size: 28px;
  color: #666;
  line-height: 1.5;
}

.dialogFooter {
  display: flex;
  border-top: 1px solid #f0f0f0;
}

.cancelButton, .confirmButton {
  flex: 1;
  height: 90px;
  border: none;
  font-size: 28px;
  background: none;
}

.cancelButton {
  color: #666;
  border-right: 1px solid #f0f0f0;
}

.confirmButton {
  color: #2054c4;
  font-weight: bold;
}